<template>
<div class="carousel-container">
  <el-carousel type="card" height="600px" :autoplay="false">
    <el-carousel-item v-for="item in list" :key="item">
      <img :src="item.url" alt="">
    </el-carousel-item>
  </el-carousel>
  </div>
</template>
<script lang="ts" setup>
// import img1 from '../assets/imgs22.jpg'
const list =[
    {
        url:getImageUrl('22')
    },
    {
        url:getImageUrl('44')
    },
    {
        url:getImageUrl('66')
    },
    {
        url:getImageUrl('88')
    },
]
function getImageUrl(name:string) {
    return new URL(`../assets/imgs/${name}.jpg`, import.meta.url).href;
}
</script>

<style scoped>
.carousel-container{
    width:100%;
    height: 600px;
    
}
.el-carousel__item img{
    height: 600px;
    width: 100%;
    filter: blur(4px);
}
.el-carousel__item--card.is-active img{
    height: 600px;
    width: 100%;
    filter: blur(0px);
}
.el-carousel__item h3 {
  color: #475669;
  font-size: 18px;
  opacity: 0.75;
  line-height: 600px;
  margin: 0;
  text-align: center;
}

.el-carousel__item:nth-child(2n) {
  background-color: #99a9bf;
}

.el-carousel__item:nth-child(2n + 1) {
  background-color: #d3dce6;
}
</style>